{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['106.461902,29.608258;106.463409,29.608886;106.46457,29.610791;106.465575,29.611179;106.466233,29.611308;106.467688,29.611248;106.469524,29.610601;106.472563,29.61025;106.475671,29.610457;106.478493,29.609733;106.480389,29.60978;106.481332,29.610189;106.481489,29.610498;106.481203,29.611184;106.480796,29.611569;106.480181,29.612072;106.480156,29.612318;106.480891,29.613069;106.481376,29.613354;106.481722,29.613451;106.482432,29.613319;106.484536,29.611761;106.485808,29.610706;106.486284,29.610121;106.486146,29.609596;106.485358,29.608884;106.485193,29.608522;106.485496,29.607043;106.486085,29.606338;106.486734,29.606058;106.487146,29.606079;106.487167,29.606081;106.487184,29.606081;106.487664,29.606106;106.48768,29.606107;106.487691,29.606107;106.488058,29.606126;106.488673,29.60638;106.489521,29.606682;106.489763,29.606662;106.49043,29.605618;106.491131,29.603414;106.491996,29.601122;106.492212,29.599986;106.492005,29.59942;106.490706,29.598518;106.490048,29.598208;106.488716,29.597925;106.486889,29.598386;106.485946,29.598187;106.485678,29.597908;106.485703,29.596998;106.48656,29.595166;106.487711,29.592171;106.487824,29.591011;106.487642,29.590216;106.486889,29.58877;106.486542,29.588819;106.485997,29.589601;106.485703,29.589904;106.484725,29.590419;106.484361,29.590357;106.484249,29.589876;106.484621,29.588739;106.486214,29.585989;106.486361,29.585636;106.486369,29.585612;106.486369,29.585557;106.486404,29.585534;106.487027,29.584052;106.487252,29.583784;106.487927,29.583474;106.489598,29.583087;106.490264,29.582642;106.490879,29.581329;106.490697,29.580764;106.49063,29.580617;106.490621,29.580601;106.490618,29.580588;106.490582,29.58051;106.490574,29.580495;106.490569,29.580481;106.490532,29.580399;106.490264,29.580009;106.490359,29.579662;106.490532,29.579433;106.492107,29.578395;106.492458,29.578071;106.492463,29.578058;106.492482,29.578048;106.494764,29.575938;106.497756,29.573101;106.498059,29.573005;106.498752,29.573337;106.499098,29.573922;106.498968,29.575127;106.4975,29.577396;106.497058,29.578139;106.496755,29.579237;106.496798,29.579758;106.497136,29.580049;106.498486,29.580069;106.499127,29.579599;106.499272,29.578501;106.499282,29.578491;106.499277,29.578472;106.499317,29.57817;106.499256,29.577729;106.499205,29.577343;106.499178,29.577143;106.499299,29.576867;106.499957,29.576244;106.501469,29.575346;106.504204,29.57403;106.505372,29.573714;106.506143,29.573054;106.506541,29.573022;106.50925,29.574473;106.512325,29.5766;106.512983,29.577356;106.513641,29.578526;106.514056,29.579057;106.514437,29.579336;106.515432,29.579639;106.516038,29.579524;106.516289,29.578718;106.516445,29.578218;106.517544,29.577308;106.518124,29.577078;106.518644,29.577129;106.519691,29.577799;106.520098,29.578416;106.520141,29.579653;106.519786,29.57998;106.519051,29.58039;106.518955,29.580601;106.519457,29.581151;106.52066,29.581011;106.52121,29.581237;106.52115,29.581263;106.521737,29.581803;106.521999,29.581929;106.522172,29.582317;106.522503,29.582653;106.522466,29.58355;106.522592,29.583754;106.523153,29.583896;106.523834,29.583999;106.523934,29.584112;106.524232,29.584813;106.52568,29.585157;106.526294,29.585271;106.526586,29.585005;106.526887,29.585018;106.527043,29.585198;106.527031,29.586056;106.527101,29.586131;106.528322,29.586715;106.52846,29.586781;106.529239,29.587154;106.529906,29.587306;106.531291,29.587313;106.53214,29.586909;106.533196,29.586142;106.533681,29.586161;106.534183,29.586837;106.535759,29.587994;106.536686,29.588226;106.537396,29.588181;106.538652,29.587704;106.53879,29.587022;106.53847,29.585896;106.538695,29.585531;106.543198,29.583794;106.545589,29.5832;106.545681,29.583141;106.545694,29.583135;106.545706,29.583126;106.548187,29.581553;106.549253,29.581453;106.549825,29.581593;106.550596,29.582076;106.55086,29.582505;106.550867,29.582517;106.550882,29.582539;106.550908,29.583499;106.550501,29.584123;106.549834,29.584914;106.550007,29.585248;106.550604,29.585321;106.551384,29.584987;106.551774,29.584915;106.555153,29.585112;106.556809,29.585714;106.559105,29.587358;106.562182,29.589551;106.56246,29.589841;106.562668,29.590575;106.562468,29.592323;106.562521,29.593146;106.563119,29.594514;106.564012,29.596338;106.564211,29.597278;106.563839,29.600695;106.562903,29.604183;106.563284,29.606182;106.563934,29.607479;106.565686,29.61004;106.567194,29.611509;106.567827,29.611571;106.568764,29.611407;106.56911,29.611546;106.570411,29.613018;106.572068,29.615043;106.572623,29.616479;106.572796,29.618587;106.572987,29.619622;106.573351,29.620362;106.573872,29.620565;106.574939,29.620527;106.577133,29.619628;106.578226,29.619306;106.579215,29.619068;106.579649,29.619224;106.580022,29.619942;106.580048,29.620953;106.580109,29.621453;106.581159,29.625038;106.583224,29.630161;106.583311,29.630645;106.583146,29.631655;106.582782,29.633035;106.582799,29.633711;106.583432,29.634687;106.584031,29.635034;106.585211,29.635161;106.58726,29.634576;106.588353,29.634836;106.590402,29.635901;106.590992,29.636623;106.591522,29.637712;106.591999,29.638116;106.593189,29.638545;106.594014,29.638678;106.595629,29.638568;106.597895,29.637856;106.599015,29.637348;106.599762,29.636849;106.601195,29.635893;106.601065,29.635618;106.600518,29.635209;106.601082,29.634749;106.602237,29.634454;106.602906,29.634394;106.603228,29.634504;106.603506,29.634739;106.603774,29.635329;106.603879,29.636688;106.604122,29.637285;106.604626,29.637776;106.607119,29.638304;106.61162,29.639866;106.612385,29.639773;106.613802,29.638723;106.613914,29.638137;106.613567,29.637299;106.613636,29.636926;106.61441,29.636296;106.615053,29.636097;106.616391,29.63615;106.617078,29.6364;106.61826,29.63718;106.618373,29.637382;106.618191,29.637892;106.6174,29.638986;106.617513,29.639361;106.618643,29.639672;106.619503,29.639639;106.621129,29.639136;106.621903,29.638568;106.621799,29.638023;106.621225,29.637278;106.621025,29.636902;106.620686,29.636008;106.620859,29.635602;106.621816,29.635216;106.623911,29.635505;106.625268,29.635901;106.627076,29.636524;106.627981,29.636638;106.629094,29.636539;106.631311,29.635982;106.633712,29.634899;106.634338,29.634863;106.635634,29.635251;106.636165,29.635933;106.636522,29.637091;106.636878,29.637348;106.637705,29.637288;106.639427,29.636576;106.641811,29.634563;106.64302,29.63402;106.643577,29.634047;106.644238,29.63522;106.646753,29.636867;106.648076,29.637192;106.648676,29.636972;106.648937,29.636528;106.648868,29.635542;106.648485,29.635048;106.647797,29.634394;106.64771,29.634066;106.648084,29.633242;106.649659,29.631625;106.650077,29.631502;106.650939,29.631859;106.651208,29.632125;106.651504,29.632896;106.651887,29.634574;106.652418,29.635007;106.653924,29.635209;106.655021,29.635203;106.657275,29.63486;106.659581,29.634;106.662044,29.632485;106.662967,29.631579;106.664089,29.630307;106.664508,29.629913;106.665108,29.629328;106.665865,29.629099;106.666753,29.628558;106.667989,29.628007;106.669086,29.627458;106.670313,29.626963;106.671619,29.626811;106.673012,29.626998;106.674204,29.627079;106.674161,29.627769;106.673796,29.628352;106.673508,29.629335;106.673804,29.630186;106.674527,29.630776;106.67511,29.630858;106.679071,29.629513;106.682248,29.628177;106.682979,29.627499;106.683693,29.626368;106.684137,29.62586;106.687227,29.623654;106.688428,29.623188;106.688994,29.623202;106.689429,29.623443;106.689864,29.62438;106.690291,29.626975;106.690996,29.628018;106.692493,29.628969;106.693224,29.629111;106.695122,29.627726;106.697672,29.627266;106.698586,29.62733;106.700387,29.627915;106.700596,29.628336;106.700527,29.629072;106.700692,29.629339;106.701223,29.629568;106.702337,29.629631;106.704443,29.628306;106.705783,29.628347;106.706444,29.628593;106.708149,29.629638;106.708846,29.630249;106.709472,29.631351;106.710003,29.633452;106.710691,29.636176;106.712004,29.638207;106.712005,29.639881;106.711692,29.64212;106.711596,29.643238;106.711492,29.645639;106.711866,29.646833;106.712083,29.646985;106.712658,29.646947;106.715259,29.645305;106.716538,29.644947;106.71833,29.644545;106.719147,29.644206;106.720296,29.643352;106.721643,29.642005;106.722374,29.641377;106.723479,29.640559;106.723922,29.640614;106.724801,29.642154;106.726497,29.645608;106.727288,29.646157;106.728358,29.646319;106.729923,29.646279;106.730566,29.646551;106.730679,29.647141;106.730254,29.648077;106.730245,29.648478;106.73061,29.648832;106.731219,29.649298;106.731323,29.649582;106.731001,29.651386;106.730889,29.653309;106.731349,29.654876;106.732289,29.656911;106.73268,29.65794;106.734062,29.664251;106.734862,29.665359;106.734889,29.666142;106.734636,29.667278;106.734837,29.667777;106.735393,29.668075;106.735854,29.668114;106.736688,29.66788;106.737453,29.667186;106.739374,29.663191;106.74066,29.662165;106.741277,29.662174;106.741677,29.662535;106.742294,29.663529;106.743876,29.668594;106.744737,29.67043;106.745267,29.671182;106.745823,29.671192;106.747092,29.669856;106.747413,29.669255;106.7477,29.66805;106.7475,29.667162;106.746909,29.665979;106.746874,29.665391;106.74703,29.665094;106.747726,29.66471;106.749498,29.66415;106.749967,29.663616;106.750141,29.661441;106.749602,29.65909;106.747925,29.65632;106.747934,29.655138;106.748324,29.654579;106.749072,29.654276;106.750184,29.654228;106.750653,29.654052;106.753181,29.652284;106.754162,29.651589;106.755092,29.651396;106.755509,29.651572;106.756464,29.652462;106.758045,29.654391;106.758592,29.655303;106.759305,29.656483;106.759652,29.656726;106.759817,29.656399;106.76006,29.655912;106.760025,29.655072;106.759782,29.653974;106.760095,29.653618;106.760928,29.653409;106.762075,29.653383;106.762639,29.653337;106.764619,29.652998;106.765904,29.652896;106.766546,29.65316;106.766885,29.653562;106.767059,29.654454;106.766989,29.655396;106.766833,29.656648;106.76718,29.657182;106.767728,29.657531;106.768899,29.657876;106.771391,29.657933;106.772589,29.658099;106.775913,29.659067;106.77751,29.659704;106.779384,29.661042;106.782525,29.662423;106.783341,29.663436;106.784052,29.665033;106.784504,29.665745;106.786083,29.667026;106.786239,29.667416;106.786109,29.668265;106.785909,29.668513;106.785189,29.668885;106.783532,29.669516;106.783229,29.669983;106.783697,29.671567;106.784192,29.672326;106.786343,29.674824;106.787593,29.675997;106.790196,29.677824;106.791679,29.678421;106.79298,29.678595;106.795642,29.678175;106.797967,29.677271;106.799285,29.676368;106.801877,29.673217;106.802285,29.672296;106.803091,29.671728;106.804418,29.671112;106.805779,29.67091;106.806681,29.671132;106.807349,29.671962;106.80832,29.673769;106.809421,29.674702;106.810626,29.675113;106.811796,29.675189;106.814025,29.675155;106.816027,29.675091;106.81751,29.674977;106.818957,29.674786;106.820223,29.674486;106.821107,29.674113;106.821982,29.673354;106.822286,29.672429;106.822095,29.671528;106.820977,29.668834;106.820084,29.666529;106.819694,29.665092;106.819676,29.664268;106.819815,29.663644;106.820578,29.662495;106.821826,29.661069;106.823317,29.660074;106.824643,29.659559;106.825718,29.659512;106.826845,29.659967;106.828977,29.661689;106.830165,29.662355;106.831361,29.662933;106.832523,29.663208;106.833701,29.663217;106.83495,29.662915;106.836571,29.662341;106.838183,29.661769;106.840254,29.661182;106.841798,29.660584;106.843037,29.660215;106.846271,29.660042;106.850562,29.659889;106.850952,29.659767;106.851247,29.659542;106.851784,29.65855;106.852365,29.657681;106.853015,29.657367;106.854914,29.656695;106.85611,29.656048;106.857107,29.655228;106.858009,29.654144;106.858703,29.653144;106.859292,29.652663;106.860272,29.652236;106.861434,29.651683;106.863923,29.650512;106.864521,29.649896;106.864799,29.648919;106.864799,29.647912;106.865145,29.647195;106.865648,29.646919;106.866359,29.646974;106.867045,29.647572;106.867756,29.649162;106.86891,29.650869;106.87002,29.65224;106.871286,29.653551;106.872327,29.654616;106.873794,29.656177;106.875737,29.657852;106.877767,29.659339;106.878626,29.659583;106.880014,29.659788;106.882114,29.660283;106.883624,29.660675;106.884536,29.660763;106.885264,29.660515;106.885698,29.660178;106.885872,29.659666;106.885863,29.658732;106.885551,29.65628;106.885551,29.655405;106.885819,29.654792;106.886557,29.654295;106.887304,29.654177;106.888076,29.654381;106.888822,29.655038;106.890064,29.656539;106.890767,29.657066;106.891609,29.657211;106.893649,29.657064;106.890993,29.6517;106.89002,29.649678;106.888449,29.646851;106.887494,29.645236;106.8864,29.643216;106.885906,29.641595;106.884335,29.638564;106.883606,29.636945;106.882876,29.635329;106.882148,29.63371;106.88023,29.630786;106.879492,29.628659;106.87865,29.626941;106.878034,29.625322;106.877548,29.624209;106.876108,29.62189;106.874416,29.618658;106.873809,29.617343;106.873089,29.615827;106.870694,29.6123;106.869012,29.60978;106.866999,29.607775;106.86582,29.606674;106.864042,29.605072;106.862489,29.603162;106.861544,29.602056;106.860703,29.600542;106.859723,29.598113;106.85935,29.596898;106.858622,29.595177;106.857772,29.592951;106.856549,29.589815;106.856054,29.588498;106.854971,29.58607;106.854589,29.584447;106.853731,29.582323;106.853367,29.581208;106.852638,29.579692;106.852265,29.578069;106.85119,29.57656;106.850471,29.57545;106.848841,29.575374;106.846517,29.575715;106.843509,29.576578;106.841438,29.577628;106.839712,29.578775;106.83869,29.579912;106.837892,29.580943;106.837208,29.581665;106.835613,29.583524;106.833324,29.585495;106.83114,29.586954;106.829528,29.587997;106.82815,29.588731;106.824925,29.590512;106.823426,29.591147;106.821102,29.59159;106.818667,29.591629;106.817028,29.591248;106.815849,29.590655;106.814445,29.589861;106.8135,29.589061;106.812321,29.588469;106.810222,29.588092;106.808827,29.58791;106.806728,29.587842;106.804873,29.588175;106.803018,29.588508;106.80117,29.589045;106.798864,29.590403;106.797363,29.591139;106.796219,29.592072;106.795776,29.593505;106.794996,29.595247;106.794554,29.59668;106.794025,29.599844;106.79406,29.601472;106.793158,29.603114;106.792472,29.604042;106.791553,29.604666;106.790165,29.605298;106.788422,29.605324;106.783789,29.606611;106.781238,29.607259;106.7788,29.607702;106.775892,29.608251;106.773228,29.608696;106.770911,29.609442;106.768706,29.60988;106.766969,29.610412;106.764634,29.610546;106.761959,29.610583;106.757991,29.610432;106.754256,29.610278;106.752623,29.610096;106.751571,29.609703;106.748618,29.607706;106.747305,29.605888;106.746219,29.603765;106.745011,29.601236;106.744281,29.59931;106.743655,29.597178;106.742934,29.595762;106.741717,29.592824;106.741108,29.591305;106.7405,29.589683;106.739187,29.588071;106.737762,29.586664;106.736232,29.585766;106.733997,29.584672;106.732467,29.583979;106.730937,29.583387;106.72918,29.582899;106.726024,29.582121;106.724258,29.581429;106.720979,29.580655;106.718631,29.579866;106.715821,29.579187;106.713002,29.578506;106.709609,29.577628;106.707607,29.576838;106.706076,29.575836;106.704654,29.575035;106.703471,29.57413;106.702409,29.573327;106.700164,29.571621;106.699328,29.570511;106.697422,29.568393;106.695881,29.566782;106.694219,29.565374;106.69233,29.564274;106.689988,29.563688;106.688692,29.563091;106.686585,29.562605;106.68366,29.562127;106.681789,29.562249;106.679691,29.562373;106.678176,29.562696;106.677367,29.562907;106.674703,29.564259;106.673893,29.56488;106.672631,29.566319;106.671613,29.567857;106.67116,29.568778;106.670473,29.569702;106.669907,29.570725;106.669219,29.571649;106.668427,29.573186;106.666733,29.576342;106.66541,29.578828;106.664661,29.581049;106.66353,29.583192;106.662294,29.58559;106.661632,29.586789;106.660388,29.588337;106.659039,29.589629;106.657794,29.59092;106.656437,29.591873;106.654583,29.591976;106.653217,29.591737;106.651929,29.590897;106.650841,29.589888;106.649457,29.588794;106.646994,29.587798;106.644836,29.587225;106.641904,29.58683;106.640147,29.58719;106.638015,29.588322;106.636371,29.589362;106.634928,29.5904;106.633292,29.592037;106.632535,29.593493;106.631301,29.595382;106.630831,29.596664;106.629683,29.59838;106.629213,29.599409;106.628361,29.601207;106.627996,29.602659;106.627814,29.603599;106.627735,29.604452;106.627744,29.605303;106.627675,29.607094;106.627701,29.608542;106.627336,29.610165;106.626484,29.611708;106.625623,29.61274;106.624658,29.613772;106.62331,29.61498;106.62118,29.615855;106.618755,29.61665;106.616912,29.617354;106.613983,29.617643;106.612523,29.61766;106.609881,29.617351;106.607535,29.617122;106.605381,29.616635;106.603912,29.616227;106.602245,29.615567;106.600968,29.6149;106.598797,29.613648;106.597129,29.612986;106.595167,29.61216;106.593596,29.611411;106.592423,29.610914;106.589663,29.609331;106.588473,29.607981;106.586486,29.605621;106.585192,29.603933;106.584394,29.602581;106.583396,29.600804;106.582485,29.598686;106.581669,29.596566;106.58094,29.593167;106.580402,29.590278;106.580367,29.587977;106.580731,29.586271;106.580914,29.585415;106.581157,29.582345;106.581035,29.580728;106.5812,29.578765;106.581859,29.57748;106.582241,29.576622;106.582889,29.575164;106.583557,29.574217;106.584806,29.572925;106.586446,29.571795;106.588191,29.571262;106.587288,29.569741;106.586793,29.569066;106.585804,29.568226;106.584919,29.567469;106.584129,29.566884;106.58294,29.565962;106.581665,29.56521;106.580094,29.564293;106.578428,29.563719;106.577058,29.563139;106.57462,29.562831;106.572478,29.562604;106.570336,29.562971;106.568203,29.563426;106.566946,29.563868;106.565784,29.564311;106.564536,29.565179;106.563669,29.565873;106.562222,29.566659;106.560869,29.567189;106.559899,29.567286;106.557862,29.567655;106.556502,29.567759;106.555236,29.567862;106.553581,29.567544;106.551822,29.567398;106.549882,29.567339;106.548123,29.567022;106.547049,29.566781;106.545394,29.566463;106.544606,29.565879;106.543039,29.564878;106.541956,29.563956;106.541064,29.563202;106.540665,29.562269;106.540258,29.560998;106.539851,29.559895;106.539254,29.559051;106.53895,29.55829;106.538457,29.557614;106.53766,29.556602;106.536681,29.555765;106.535789,29.554756;106.533919,29.553503;106.532066,29.552933;106.530404,29.55236;106.528949,29.552212;106.527296,29.552234;106.525547,29.552174;106.523513,29.552375;106.521669,29.552487;106.519142,29.552778;106.514606,29.55473;106.512131,29.555587;106.506765,29.556705;106.505605,29.556976;106.504203,29.557373;106.503995,29.557489;106.502342,29.557513;106.500334,29.556855;106.498586,29.55627;106.495522,29.555092;106.494042,29.554807;106.491948,29.554531;106.490035,29.554559;106.488564,29.554886;106.487698,29.555126;106.486062,29.556218;106.484686,29.557381;106.48305,29.559007;106.481682,29.560553;106.480479,29.561713;106.478852,29.563491;106.477398,29.565115;106.474913,29.56782;106.474229,29.56882;106.472783,29.570596;106.471415,29.572598;106.470134,29.574141;106.468681,29.575918;106.467132,29.577465;106.466023,29.578701;106.463442,29.581178;106.461026,29.582583;106.458861,29.583374;106.457128,29.583701;106.45478,29.584344;106.453403,29.585352;106.451939,29.586441;106.451263,29.587823;106.451021,29.589123;106.451384,29.590568;106.451922,29.591705;106.452901,29.592914;106.454053,29.594349;106.455301,29.596088;106.456271,29.597067;106.457501,29.598043;106.458125,29.599025;106.45894,29.600771;106.459304,29.60214;106.460109,29.603425;106.460915,29.604865;106.461547,29.606459;106.461824,29.60798;106.461902,29.608258']\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import requests\n",
    "import os\n",
    "r =requests.get(\"https://restapi.amap.com/v3/config/district?keywords=500105&cities=重庆市&subdistrict=0&key=4e3dc8b62856b77f60a2f5dad998a6e2&extensions=all\")\n",
    "s=r.json()\n",
    "poly=s[\"districts\"][0][\"polyline\"]\n",
    "p=poly.split(\"|\")\n",
    "\n",
    "\n",
    "os.chdir(r'D:\\dianpingdata\\高德用重庆火锅数据')\n",
    "for i in range(len(p)):\n",
    "    a=p[i].split(\";\")\n",
    "    for j in range(len(a)):\n",
    "        x.append([a[j].split(\",\")[0],a[j].split(\",\")[1]])\n",
    "c = pd.DataFrame(x)\n",
    "c.to_csv('江北区.csv', encoding=\"utf_8_sig\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
